package com.service.impl;

import com.dao.NoticeDao;
import com.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
public class NoticeServiceImpl implements NoticeService {

    @Autowired
    NoticeDao noticeDao;

    @Override
    @Transactional
    public Boolean deleteNote() {
        int i = noticeDao.deleteNote();
        if (i == 5){
            return true;
        }
        return false;
    }

    @Override
    @Transactional
    public Integer insertNote(String note) {
        return noticeDao.insertNote(note);
    }

    @Override
    @Transactional
    public String[] selectNote() {
        String[] strings = noticeDao.selectNote();
        return strings;
    }
}
